Imports MIMS.WRS.Entities
Imports MIMS.WRS.Business

Public Class CountryView
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents txtCountryCode As System.Web.UI.WebControls.TextBox
    Protected WithEvents txtCountryName As System.Web.UI.WebControls.TextBox
    Protected WithEvents btnClose As System.Web.UI.WebControls.Button
    Protected WithEvents txtMeasurementUnit As System.Web.UI.WebControls.TextBox

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not IsPostBack Then
            Try
                Dim countryID As Int32 = Convert.ToInt32(Request.Item("id"))
                Dim countryItem As Country = (CountryService.GetCountry(countryID))
                txtCountryCode.Text = countryItem.CountryCode
                txtCountryName.Text = countryItem.CountryName
                txtMeasurementUnit.Text = countryItem.MeasUnit
            Catch ex As Exception
            End Try
        End If
    End Sub

End Class
